package com.gccloud.tgyfirst.bro.common;

import com.gccloud.starter.plugins.validator.group.Insert;
import com.gccloud.starter.plugins.validator.group.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class BroCommon {

    @ApiModelProperty(notes = "主键")
    @NotBlank(message = "ID不能为空", groups = {Update.class})
    private String id;

    @ApiModelProperty(notes = "姓名")
    @NotBlank(message = "姓名不能为空", groups = {Insert.class, Update.class})
    private String name;

    @ApiModelProperty(notes = "年龄")
   // @NotNull(message = "年龄不能为空", groups = {Insert.class, Update.class})
    private Integer age;

    @ApiModelProperty(notes = "性别")
    //@NotNull(message = "性别不能为空", groups = {Insert.class, Update.class})
    private Integer sex;

    @ApiModelProperty(notes = "家乡")
    private String hometown;

    @ApiModelProperty(notes = "爱好")
    private String hobby;
}
